package org.huntaway.kindergarten.service.common;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.huntaway.kindergarten.manager.ClassInfoMng;
import org.huntaway.kindergarten.po.ClassInfo;
import org.huntaway.kindergarten.service.KindProcessor;
import org.huntaway.kindergarten.util.GlobalCon;

public class ClassInfoSeleService  extends KindProcessor<ClassInfo> {
	public ClassInfoSeleService() {
		super();
		baseMng = (ClassInfoMng) sm.getMng(GlobalCon.CLASS_INFO);
	}
	@Override
	public ClassInfo getObj() {
		return new ClassInfo();
	}

	public ActionForward list(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.list(mapping, form, request, response);
		List<ClassInfo> resLst = findList(getObj());
		request.setAttribute(RES_LST, resLst);
		return serBean;
	}

	public ActionForward query(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.list(mapping, form, request, response);
		List<ClassInfo> resLst = findList(getObj());
		request.setAttribute(RES_LST, resLst);
		return serBean;
	}

}
